import dayjs from 'dayjs';
import { RESPONSE_CODE, RESPONSE_MSG } from 'src/enums';
import type { Api } from 'src/types';
export const responseMessage = <T = any>(
  data: T,
  message: string = RESPONSE_MSG.SUCCESS,
  code: number = RESPONSE_CODE.SUCCESS,
): Api.Common.Response<T> => ({
  data,
  message,
  code,
  timestamp: dayjs().format('YYYY-MM-DD HH:mm:ss'),
});
